#ifndef FLASHPLAYER_H
#define FLASHPLAYER_H

#include <QObject>
#include <QWebView>
#include <QDebug>
#include <QWebFrame>
#include <QFile>

#include "log.h"

extern QString g_installPath;

class FlashPlayer : public QObject
{
    Q_OBJECT

    LOG4QT_DECLARE_QCLASS_LOGGER

public:
    explicit FlashPlayer(QObject *parent = 0);

    void open(QString filename);
    void setRect(QRect rect);
    void setRect(int ax, int ay, int aw, int ah);
    void stop();

    void show();
    void hide();

    void reStart();

signals:
    void msgFinish();

public slots:
    void playFinish();
    void flashLoadProgress(const int);


private:
    QWebView * m_pPlayer;
    QString    m_flashPath;
    int        m_playFlashCount;

    bool       m_isLoadPlugin;
};

#endif // FLASHPLAYER_H
